@extends('layouts.app')

@section('content')
    <div class="legal-services-page">
        <div class="policy-service-banner">
            <img src="{{ asset('images/legal-services/banner.png') }}" alt="">
        </div>

        <div class="policy-service-content">
            <div class="policy-service-actions">
                <div class="policy-service-type-list">
                    <span>
                        <a href="{{ route('legal.index') }}" class="policy-service-type-item item-active">案例展示</a>
                        <a href="{{ route('legal.lawyer') }}" class="policy-service-type-item">律师咨询服务</a>
                    </span>
                </div>
            </div>

            <div class="policy-service-list">
                <div>
                    @foreach ($cases as $case)
                        <div class="policy-service-item">
                            <a href="{{ route('legal.show', [$case['id']]) }}">
                                <img src="{{ asset($case['cover']) }}" alt="" class="flex-shrink-0">
                                <div class="policy-item-info">
                                    <p>{{ $case['title'] }}</p>
                                    <p class="text-sm text-gray-500">{{ $case['description'] }}</p>
                                    <p class="time">{{ $case['updated_at'] }}</p>
                                </div>
                            </a>
                        </div>
                    @endforeach
                </div>

                @if ($cases->hasPages())
                    <div class="paginate">
                        {{ $cases->links() }}
                    </div>
                @endif
            </div>
        </div>
    </div>
@stop
